# num1 = 10
# num2 = 99
# # if num1 + num2 > 100:
# #     print("Hello,World")
# # else:
# #     print("Bye")

# # if num1> 5 and num2 <90:
# #     print("yes")
# # else:
# #     print("no")

#if-elif-else
# print("欢迎光临\n")
# age = int(input("请输入你的身高(cm):"))
# vip_level = int(input("请输入你的vip等级(1-5):"))

# if age < 12:
#     print("可以免费游玩。")
# elif vip_level > 3:
#     print("VIP等级大于3，可以免费游玩。")
# else:
#     print("不好意思，条件不满足，缴费10元")

# if int(input("你的身高：")) > 120:
#     print("身高大于120，不可以免费")
#     print("但是VIP等级大于3可以免费游玩")

#     if int(input("你的VIP等级：")) > 3:
#         print("你的VIP等级大于3，可以免费游玩")
#     else:
#         print("不好意思，VIP等级不够")
# else:
#     print("身高小于120，可以免费游玩")

# import random
# num = random.randint(1,10)
# print(num)

# num1 = int(input("请输入数字（1-10）："))
# if num1 < num:
#     print("猜小了，还有两次机会")
    
# elif num1 > num:
#     print("猜大了，还有两次机会")
# else:
#     print("恭喜你，猜对了")

# num2 = int(input("请输入数字（1-10）："))
# if num2 < num:
#     print("猜小了，还有一次机会")
    
# elif num2 > num:
#     print("猜大了，还有一次机会")
# else:
#     print("恭喜你，猜对了")

# num3 = int(input("请输入数字（1-10）："))
# if num3 < num:
#     print("猜小了，没机会了")
    
# elif num > num:
#     print("猜大了，没机会了")
# else:
#     print("恭喜你，猜对了")


# i= 0
# while i < 100 :
#     print("I LOVE YOU")
#     i += 1

#求1-100的和
# i = 1
# sum = 0
# while i <= 100:
#     sum += i
#     i += 1
# print(f"1-100的和为{sum}")

# print("依次是：{}{}{}".format(1,2,3))

# import random
# num = random.randint(1,100)

# tag = True
# count = 0
# while tag:
#     guess_num = int(input("Please input your guess number:"))
#     count += 1

#     if guess_num == num:
#         print("猜中了")
#         tag = False
#     else:
#         if(guess_num > num):
#             print("猜测的数字大了")
#         else:
#             print("猜测的数字小了")

# print(f"A total of {count} guesses were made")

# print("hello", end = '')
# print("world", end = '')         单独的print打印自动是换行的，如果不要换行，需要在后面加上
                                    # end = ''

# i = 1
# while i <= 9:
#     j = 1
#     while j <= i:
#         print(f"{j} * {i} = {i * j}\t",end = '')
#         j += 1
#     i += 1
#     print()

# name = "fengjiarui"

# for x in name:
#     print(x)

name = "itheima is a brand of itcast"
count = 0

for i in name:
    if i == "a":
        count += 1
print(f"name中一共有{count}个“a”")